using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using AutumnEngine.Modules;

namespace AutumnEngine.Modules
{
    /// <summary>
    /// Manages content within the engines embedded resource system.
    /// </summary>
    public class EmbeddedContentManagerModule : Module
    {
        ResourceContentManager r;
        /// <summary>
        /// Creates this instance.
        /// </summary>
        public override void Create()
        {
            r = new ResourceContentManager(Engine.ContentManager.ServiceProvider, EngineResources.ResourceManager);
            this.Removable = false;
            this.CanBeDisabled = false;   
            base.Create();
        }

        /// <summary>
        /// Loads the asset at the specified path.
        /// </summary>
        /// <typeparam name="T">Type of asset.</typeparam>
        /// <param name="path">The path.</param>
        /// <returns></returns>
        public T Load<T>(string path)
        {
            return r.Load<T>(path);
        }
    }
}